/**
 * 
 */
const map_container = "map-container";
const CESIUM_BASE_URL = "cesium";
const CESIUM_ACCESS_TOKEN =
    "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIxOTE3NzA4Ny04MThiLTQwMzgtODE4Ni1mZWU5N2ZiYTBhZWMiLCJpZCI6MTU5MTYsInNjb3BlcyI6WyJhc3IiLCJnYyJdLCJpYXQiOjE1NjkxNTI3MTl9.go1ZA9NegvqwBjzaHLh_4vovgsM7ZJudVDA3HEnMVPw";

export async function useCesium() {
    console.log("useCesium");
    window.CESIUM_BASE_URL = CESIUM_BASE_URL;
    Cesium.Ion.defaultAccessToken = CESIUM_ACCESS_TOKEN;

    const viewer = new Cesium.Viewer(map_container, {
        terrain: Cesium.Terrain.fromWorldTerrain(),
    });

    // const buildingTileset = await Cesium.createOsmBuildingsAsync();
    // viewer.scene.primitives.add(buildingTileset);

    // viewer.camera.flyTo({
    //     destination: Cesium.Cartesian3.fromDegrees(-122.4175, 37.655, 400),
    //     orientation: {
    //         heading: Cesium.Math.toRadians(0.0),
    //         pitch: Cesium.Math.toRadians(-15.0),
    //     },
    // });
}
